﻿<%@ Page Title="Export to Spreadsheet &raquo; ResourceBlender" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TranslationsExcel.aspx.cs" Inherits="TranslationsExcel" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <asp:ScriptManager ID="scrUpdateLanguages" runat="server"></asp:ScriptManager>
        <asp:MultiView ID="mltMain" runat="server" ActiveViewIndex="0">
            <asp:View ID="viwNoApps" runat="server">
                <h1><asp:Label ID="lblManageTranslationsHeading" runat="server" Text="Manage Translations"></asp:Label></h1>
                <p>You must <asp:HyperLink ID="lnkAddApplication" runat="server" Text="add an application" NavigateUrl="~/Applications.aspx">add an application</asp:HyperLink> before generating resources.</p>
            </asp:View>
            <asp:View ID="viwSelectTranslations" runat="server">
                <h1><asp:Label ID="lblSelectTranslationsHeading" runat="server" Text="Manage Translations"></asp:Label></h1>
                <div class="niceform">
                    <asp:UpdatePanel ID="updChlApplication" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <fieldset>
                                <legend>Select Components</legend>
                                <div class="formrow block threecol">
                                    <div class="formcol">
                                        <label class="block">Application</label>
                                        <asp:CheckBoxList ID="chlApplication" runat="server"
                                            AutoPostBack="True" CssClass="checks applicationChecks plain" RepeatLayout="Flow" OnSelectedIndexChanged="ShowLanguages">
                                        </asp:CheckBoxList>
                                    </div>
                                    <div class="formcol">
                                        <asp:Label ID="lblBundleName" runat="server" Text="Bundles" 
                                            AssociatedControlID="lstBundles" CssClass="block"></asp:Label>
                                        <asp:ListBox ID="lstBundles" runat="server" SelectionMode="Multiple" 
                                            Rows="10" Width="100%"></asp:ListBox>
                                    </div>
                                    <div class="formcol">
                                        <asp:Label ID="lblLanguages" runat="server" Text="Languages" 
                                            AssociatedControlID="lstLanguages" CssClass="block"></asp:Label>
                                        <asp:ListBox ID="lstLanguages" runat="server" SelectionMode="Multiple" 
                                            Rows="10" Width="100%"></asp:ListBox>
                                        <asp:RequiredFieldValidator ID="vldLanguages" ControlToValidate="lstLanguages" runat="server" ErrorMessage="At least one language must be selected"></asp:RequiredFieldValidator>
                                    </div>
                                    <asp:UpdateProgress ID="prgRadApplication" runat="server" 
                                        AssociatedUpdatePanelID="updChlApplication" 
                                        DisplayAfter="100">
                                        <ProgressTemplate>
                                            <div class="centered"><asp:Image ID="imgLoadingLanguagesSelection" runat="server" ImageUrl="~/images/ajax-loader.gif" AlternateText="Loading Languages..." /></div>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </div>
                                <div class="clear">&nbsp;</div>
                            </fieldset>
                            <div class="checks actions">
                                <asp:Button ID="btnToExcel" runat="server" Text="Export to XML" CssClass="uniformbutton"
                                    PostBackUrl="Excel.aspx" />
                                <br />
                                <asp:CheckBox ID="chkZip" runat="server" Text="Export as zip file" Checked="true" CssClass="plain autowidth" />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="chlApplication" 
                                EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </asp:View>
        </asp:MultiView>
</asp:Content>

